package cn.tedu.serviceEdu;

import cn.tedu.serviceEdu.client.VodClient;
import cn.tedu.serviceEdu.entity.EduVideo;
import cn.tedu.serviceEdu.service.EduVideoService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.List;
import java.util.stream.Collectors;

@RunWith(SpringRunner.class)
@SpringBootTest
public class deleteVideoBatch {


    @Autowired
    EduVideoService videoService;

    @Test
    public void test(){
        LambdaQueryWrapper<EduVideo> lqw = new LambdaQueryWrapper<>();
        lqw.select(EduVideo::getVideoSourceId);
        lqw.eq(EduVideo::getCourseId,"1659518427989065729");
        List<EduVideo> videoList = videoService.list(lqw);
        List<String> videoIdList =
                videoList.stream().map(EduVideo::getVideoSourceId).collect(Collectors.toList());
        System.out.println(videoIdList);
//        System.out.println(videoList);
    }
}
